package com.wman.mvp.base

import android.app.Application
import com.orhanobut.logger.AndroidLogAdapter
import com.orhanobut.logger.Logger
import com.orhanobut.logger.PrettyFormatStrategy

/**
 * @ProjectName: wman
 * @Package: com.wman.mvp.base
 * @ClassName: BaseApp
 * @Description: java类作用描述
 * @Author: wman
 * @CreateDate: 2020/1/3 10:29
 * @UpdateUser: 更新者
 * @UpdateDate: 2020/1/3 10:29
 * @UpdateRemark: 更新说明
 * @Version: 1.0
 */
class BaseApp: Application() {

    override fun onCreate() {
        super.onCreate()

        val formatStrategy = PrettyFormatStrategy.newBuilder()
                .showThreadInfo(false)  // (Optional) Whether to show thread info or not. Default true
                .methodCount(0)         // (Optional) How many method line to show. Default 2
                //.methodOffset(7)        // (Optional) Hides internal method calls up to offset. Default 5
                .tag("南无阿弥陀佛")   // (Optional) Global tag for every log. Default PRETTY_LOGGER
                .build()

        Logger.addLogAdapter(AndroidLogAdapter(formatStrategy))
    }
}